<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr=['java','c','python']
        let person={
            name:"张飞",
            language:arr
        }
        //浅拷贝
        let person1 = person;
        person1.name="刘备";
        console.log(person)
        console.log(person1)

        //深拷贝
        let person2 = {...person}
        person2.name="关羽"
        console.log(person2);
    </script>
</body>
</html>